// 以后全局数据定义和修改方法都要写在这里

// 1. 导出创建 store 的方法
import { legacy_createStore as createStore } from 'redux'
import { combineReducers } from 'redux'

// 将多个 reducer 合并成一个 reducer
import countReducer from './modules/count'
import proReducer from './modules/pro'



// 将多个 reducer 合并成一个 reducer
const reducer = combineReducers({
    count: countReducer,
    pro: proReducer
})


// 3. 通过创建方法和 reducer 创建一个 store
const store = createStore(reducer)

// 4. 导出 store
export default store